#include "attribute.h"

Vals::Vals()
{
	m_var1 = 0;
	m_var2 = 0;
}

Vals::Vals(unsigned int v1_,unsigned int v2_)
{
	m_var1  =	v1_;
	m_var2  =	v2_;
}

Vals& Vals::mul(float t1,float t2)
{
	m_var1 = (unsigned int)ceil(m_var1*t1);
	m_var2 = (unsigned int)ceil(m_var2*t2);
	return *this;
}

Vals& Vals::operator =(const Vals& v)
{
	v1 = v.v1;
	v2 = v.v2;
	return *this;
}

Vals Vals::operator +(const Vals& v0)
{
	Vals v = *this;
	v.v1 += v0.v1;
	v.v2 += v0.v2;
	return v;
}

Vals& Vals::operator +=(const Vals& v)
{
	*this = *this + v;
	return *this;
}

Vals& Vals::operator *=(float t)
{
	*this = (*this*t);
	return *this;
}

Vals operator *(const Vals& v0,float t)
{
	Vals v = v0;
	v.v1 = (unsigned int)ceil(v.v1*t);
	v.v2 = (unsigned int)ceil(v.v2*t);
	return v;
}

Vals operator *(float t,const Vals& v0)
{
	return v0*t;
}
